# coding=utf-8
import gevent


def gevent_run(index):
    for x in range(index, index + 2):
        print(x)
    print('*' * 50)


if __name__ == '__main__':
    jobs = []
    for i in range(0, 10, 2):
        jobs.append(i)
    print(jobs)

    job = [gevent.spawn(gevent_run, range1) for range1 in jobs]
    gevent.joinall(job)
    print('finish')
